* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a9e 50%, #fad0c4 75%, #ffecd2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 1.5s ease;
}

/* 自定义背景容器 */
.custom-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3; /* 修改：降低不透明度至30% */
    z-index: 0;
    pointer-events: none;
}

/* 节日主题背景 */
body.theme-valentine {
    background: linear-gradient(135deg, #ffe6ea 0%, #ffc2d1 25%, #ff8fab 50%, #ffb3c1 75%, #ffe6ea 100%);
}

body.theme-christmas {
    background: linear-gradient(135deg, #e6f7ff 0%, #b3e0ff 25%, #4da6ff 50%, #b3e0ff 75%, #e6f7ff 100%);
}

body.theme-spring {
    background: linear-gradient(135deg, #e6ffea 0%, #b3ffc1 25%, #8fff9e 50%, #b3ffc1 75%, #e6ffea 100%);
}

/* 新增主题样式 */
body.theme-cartoon {
    background: linear-gradient(135deg, #ffccd5 0%, #ffb3c6 25%, #ff8fab 50%, #ffb3c6 75%, #ffccd5 100%);
    animation: cartoonBounce 8s ease infinite;
}

body.theme-minimalist {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%, #f8f9fa 100%);
}

body.theme-vintage {
    background: linear-gradient(135deg, #f4e4bc 0%, #e6d2aa 25%, #d4bf91 50%, #e6d2aa 75%, #f4e4bc 100%);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes cartoonBounce {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 25%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 100% 75%; }
}

.heart {
    position: fixed;
    font-size: clamp(14px, 3vw, 20px);
    animation: fall 10s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

/* 雪花效果 - 圣诞节主题 */
.snowflake {
    position: fixed;
    color: #fff;
    font-size: clamp(10px, 2vw, 16px);
    animation: fall 8s linear infinite;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

/* 玫瑰花瓣 - 情人节主题 */
.rose-petal {
    position: fixed;
    color: #ff6b9d;
    font-size: clamp(12px, 2.5vw, 18px);
    animation: fall 12s linear infinite;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
}

/* 花瓣 - 春季主题 */
.spring-petal {
    position: fixed;
    color: #77dd77;
    font-size: clamp(12px, 2.5vw, 18px);
    animation: fall 10s linear infinite;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
}

/* 卡通风飘落元素 */
.cartoon-item {
    position: fixed;
    font-size: clamp(12px, 2.5vw, 18px);
    animation: fall 9s linear infinite;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
}

/* 简约风飘落元素 */
.minimalist-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    animation: fallMinimalist 12s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* 复古风飘落元素 */
.vintage-item {
    position: fixed;
    font-size: clamp(10px, 2vw, 16px);
    animation: fallVintage 11s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    color: #8b4513;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes fallMinimalist {
    0% {
        transform: translateY(-100px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes fallVintage {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(180deg);
        opacity: 0;
    }
}

/* 粒子效果样式 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* 闪光动画 */
@keyframes flashGold {
    0%, 100% { box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffd700; }
    50% { box-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700, 0 0 40px #ffd700, 0 0 50px #ffd700; }
}

@keyframes shakeRed {
    0%, 100% { transform: translateX(0); box-shadow: 0 0 10px #ff6b9d; }
    25% { transform: translateX(-5px); box-shadow: 0 0 20px #ff6b9d; }
    75% { transform: translateX(5px); box-shadow: 0 0 20px #ff6b9d; }
}

.flash-gold {
    animation: flashGold 1s ease-in-out;
}

.shake-red {
    animation: shakeRed 0.5s ease-in-out;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.63); /* 修改：降低不透明度至63% */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.3);
    margin-bottom: 30px;
}

h1 {
    font-size: clamp(24px, 6vw, 42px);
    color: #ff6b9d;
    text-shadow: 2px 2px 4px rgba(255, 182, 193, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    color: #ff8fab;
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 300;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 600px 1fr;
    gap: 20px;
    align-items: start;
}

.wheel-section {
    background: rgba(255, 255, 255, 0.63); /* 修改：降低不透明度至63% */
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(255, 105, 180, 0.4);
    text-align: center;
}

/* 关键修复：转盘容器使用固定尺寸比例 */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    aspect-ratio: 1 / 1; /* 使用现代CSS特性保持正方形 */
}

/* 内部容器保持绝对定位 */
.wheel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas完全填充容器 */
#wheelCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.5);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* 指针固定在顶部中心 */
.pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff4757;
    filter: drop-shadow(0 5px 10px rgba(255, 71, 87, 0.5));
    z-index: 10;
    pointer-events: none;
}

/* 关键修复：中心按钮使用绝对居中 */
.center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 使用固定百分比大小，确保在各种缩放下保持比例 */
    width: 26%;
    height: 26%;
    min-width: 80px;
    min-height: 80px;
    max-width: 140px;
    max-height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    border: 6px solid #fff;
    cursor: pointer;
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.6);
    transition: all 0.3s ease;
    z-index: 20;
    /* 使用Flexbox确保内容居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 防止文字换行 */
    white-space: nowrap;
    user-select: none;
}

.center-button-main {
    font-size: clamp(20px, 4vw, 28px);
    line-height: 1;
}

.center-button small {
    font-size: clamp(12px, 2.5vw, 16px);
    display: block;
    margin-top: 4px;
    line-height: 1;
}

.center-button:hover:not(.spinning) {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.8);
}

.center-button.spinning {
    cursor: not-allowed;
    opacity: 0.7;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.sidebar {
    background: rgba(255, 255, 255, 0.63); /* 修改：降低不透明度至63% */
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
}

/* 修改：PC端抽奖历史模块高度与转盘模块高度保持一致 */
.history-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0; /* 允许内容收缩 */
    height: 100%; /* 新增：确保高度充满容器 */
}

.history-sidebar .item-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    max-height: 500px; /* 新增：PC端设置最大高度 */
}

.sidebar h3 {
    color: #ff6b9d;
    margin-bottom: 15px;
    font-size: clamp(18px, 4vw, 22px);
    border-bottom: 2px solid #ffd6e7;
    padding-bottom: 10px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #fff5f7, #ffe4ec);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
}

.stat-number {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: bold;
    color: #ff6b9d;
}

.stat-label {
    font-size: clamp(12px, 3vw, 14px);
    color: #ff8fab;
    margin-top: 5px;
}

.btn {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 12px;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #ffd6e7, #ffe4ec);
    color: #ff6b9d;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ffbcd4, #ffd6e7);
}

.history-item {
    background: #fff;
    padding: 15px;
    margin: 10px 0;
    border-radius: 12px;
    border-left: 4px solid #ff6b9d;
    box-shadow: 0 3px 10px rgba(255, 182, 193, 0.2);
}

.history-item.reward {
    border-left-color: #ffd700;
    background: linear-gradient(to right, #fff9e6, #fff);
}

.history-item.punishment {
    border-left-color: #ff6b9d;
    background: linear-gradient(to right, #fff0f5, #fff);
}

.history-time {
    font-size: clamp(10px, 2vw, 12px);
    color: #999;
}

.history-content {
    font-size: clamp(12px, 3vw, 14px);
    color: #333;
    margin-top: 5px;
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

@keyframes modalPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: clamp(24px, 6vw, 32px);
    color: #ff6b9d;
    margin-bottom: 10px;
}

.result-icon {
    font-size: clamp(60px, 15vw, 80px);
    margin-bottom: 20px;
}

.result-text {
    font-size: clamp(18px, 5vw, 24px);
    color: #333;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-description {
    font-size: clamp(14px, 3vw, 16px);
    color: #666;
    line-height: 1.6;
}

/* 新增：合作模式结果展示样式 */
.coop-results {
    margin-top: 20px;
    padding: 15px;
    background: #fff5f7;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
}

.coop-result {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    flex-wrap: wrap;
}

.player-result {
    text-align: center;
    flex: 1;
    min-width: 150px;
    padding: 15px;
    margin: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.player-name {
    font-weight: bold;
    color: #ff6b9d;
    margin-bottom: 10px;
    font-size: clamp(14px, 3vw, 16px);
}

.coop-outcome {
    text-align: center;
    margin-top: 15px;
    padding: 15px;
    background: #fff0f5;
    border-radius: 10px;
    font-weight: bold;
    color: #ff6b9d;
    font-size: clamp(16px, 4vw, 18px);
}

/* 新增：合作模式选择界面样式 - 优化移动端对齐 */
.player-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.selection-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #ff6b9d;
}

.selection-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-row {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: clamp(14px, 3vw, 16px);
    color: #333;
    width: 100%;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b9d;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #ff6b9d;
    border-color: #ff6b9d;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkmark {
    border-color: #ff4d87;
}

/* 合作模式按钮样式 */
#coopCompleteBtn, #coopSkipBtn {
    display: none;
}

.manage-section {
    padding: 30px;
}

.item-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.item-card {
    background: #fff;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: clamp(14px, 3vw, 16px);
}

.item-desc {
    font-size: clamp(12px, 2vw, 14px);
    color: #666;
}

.item-actions button {
    margin-left: 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 14px);
}

.delete-btn {
    background: #ff6b9d;
    color: white;
}

.edit-btn {
    background: #ffd6e7;
    color: #ff6b9d;
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ffd6e7;
    border-radius: 8px;
    font-size: clamp(14px, 3vw, 16px);
}

input:focus, textarea:focus {
    outline: none;
    border-color: #ff6b9d;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: clamp(20px, 5vw, 30px);
    color: #999;
    cursor: pointer;
    width: clamp(30px, 8vw, 40px);
    height: clamp(30px, 8vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ff6b9d;
    color: white;
}

/* 模板库相关样式 */
.template-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #ffd6e7;
}

.template-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.template-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.template-category {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #ff6b9d;
}

.template-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
}

.template-item {
    background: white;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.template-item-info {
    flex: 1;
}

.template-item-name {
    font-weight: bold;
    color: #333;
    font-size: clamp(14px, 3vw, 16px);
}

.template-item-stats {
    font-size: clamp(12px, 2vw, 14px);
    color: #666;
    margin-top: 4px;
}

.template-item-actions {
    display: flex;
    gap: 5px;
}

.template-item-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 14px);
}

.template-load-btn {
    background: #ff6b9d;
    color: white;
}

.template-delete-btn {
    background: #ffd6e7;
    color: #ff6b9d;
}

/* 在现有的模板分类样式附近添加 */
.template-category:nth-child(6) {
    border-left-color: #5ac8fa; /* 合作模式使用蓝色 */
}

.template-category:nth-child(6) h3 {
    color: #5ac8fa;
}

/* 现有样式 */
/* ... 保持原有样式不变 ... */

/* 新增玩家系统相关样式 */
.player-transition {
    transition: all 0.5s ease;
}

@keyframes rotateIn {
    from {
        transform: rotate(-10deg) scale(0.8);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

.current-player {
    text-align: center;
    font-size: clamp(18px, 5vw, 24px);
    margin: 15px 0;
    font-weight: bold;
    color: #ff6b9d;
    animation: rotateIn 0.5s ease-out;
}

/* 新增：玩家显示区域样式 */
.player-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff6b9d;
}

/* 默认头像样式 */
.player-avatar.default-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b9d, #ffd700);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 默认头像样式 */
.player-avatar.default-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b9d, #ffd700);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

#playerSettingsModal .modal-content input {
    margin-bottom: 15px;
}

.stat-card#player1Stats, .stat-card#player1Rewards {
    border-left: 3px solid #ff6b9d;
}

.stat-card#player2Stats, .stat-card#player2Rewards {
    border-left: 3px solid #ffd700;
}

/* 新增样式 */
.mode-selector {
    font-size: clamp(14px, 3vw, 16px);
    color: #ff6b9d;
}

.mode-selector input {
    width: auto;
    margin: 0 5px 0 0;
}

#settingsModal .modal-content input {
    margin-bottom: 15px;
}

.coop-result {
    margin: 15px 0;
    padding: 15px;
    background: #fff0f5;
    border-radius: 10px;
}

.coop-task {
    font-weight: bold;
    color: #ff6b9d;
    margin-top: 10px;
}

/* ========== 新增：未完成事项模态框样式 ========== */

/* 抵消卡数量显示区域 */
.offset-cards-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f7, #ffe4ec);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
}

.player-offset {
    text-align: center;
    flex: 1;
}

.player-name {
    font-size: clamp(14px, 3vw, 16px);
    color: #ff6b9d;
    font-weight: bold;
    margin-bottom: 5px;
}

.offset-count {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: bold;
    color: #ff6b9d;
}

.offset-label {
    font-size: clamp(12px, 3vw, 14px);
    color: #ff8fab;
    margin-top: 5px;
}

/* 标签页容器 */
.tab-container {
    margin-top: 20px;
}

/* 标签页按钮 */
.tab-buttons {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffd6e7;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #ff6b9d;
    border-bottom: 3px solid #ff6b9d;
    background: #fff;
}

.tab-button:hover:not(.active) {
    background: #ffe4ec;
    color: #ff6b9d;
}

/* 标签页内容 */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 玩家未完成事项区域 */
.player-pending-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 12px;
    border-left: 4px solid #ff6b9d;
}

.player-pending-section h3 {
    color: #ff6b9d;
    margin-bottom: 15px;
    font-size: clamp(16px, 4vw, 18px);
    border-bottom: 1px solid #ffd6e7;
    padding-bottom: 8px;
}

/* 未完成事项列表 */
.pending-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

/* 未完成事项项 */
.pending-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #ffd700;
}

.pending-item.punishment {
    border-left-color: #ff6b9d;
}

.pending-content {
    flex: 1;
}

.pending-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: clamp(14px, 3vw, 16px);
}

.pending-desc {
    font-size: clamp(12px, 2vw, 14px);
    color: #666;
    margin-bottom: 8px;
}

.pending-time {
    font-size: clamp(10px, 2vw, 12px);
    color: #999;
}

.pending-actions {
    display: flex;
    gap: 8px;
}

.pending-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: bold;
    transition: all 0.3s ease;
}

.complete-btn {
    background: #4cd964;
    color: white;
}

.complete-btn:hover {
    background: #3bc553;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 217, 100, 0.3);
}

.offset-btn {
    background: #ff6b9d;
    color: white;
}

.offset-btn:hover:not(:disabled) {
    background: #ff4d87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.3);
}

.offset-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 空状态提示 */
.empty-pending {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

/* ========== 新增：滚动条定制化样式 ========== */

/* Webkit浏览器滚动条样式 (Chrome, Safari, Edge) */
.item-list::-webkit-scrollbar,
.template-list::-webkit-scrollbar,
.pending-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.item-list::-webkit-scrollbar-track,
.template-list::-webkit-scrollbar-track,
.pending-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 214, 231, 0.3);
    border-radius: 3px;
}

.item-list::-webkit-scrollbar-thumb,
.template-list::-webkit-scrollbar-thumb,
.pending-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #ff6b9d;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.item-list::-webkit-scrollbar-thumb:hover,
.template-list::-webkit-scrollbar-thumb:hover,
.pending-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ff4d87;
}

.item-list::-webkit-scrollbar-corner,
.template-list::-webkit-scrollbar-corner,
.pending-list::-webkit-scrollbar-corner,
.modal-content::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox浏览器滚动条样式 */
.item-list,
.template-list,
.pending-list,
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #ff6b9d rgba(255, 214, 231, 0.3);
}

/* 移动端滚动条优化 */
@media (max-width: 768px) {
    .item-list::-webkit-scrollbar,
    .template-list::-webkit-scrollbar,
    .pending-list::-webkit-scrollbar,
    .modal-content::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    /* 移动端未完成事项按钮样式优化 */
    .pending-actions {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    .pending-actions button {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: clamp(13px, 3vw, 15px);
    }
    
    /* 移动端标签页按钮样式优化 */
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: center;
        padding: 14px;
        font-size: clamp(15px, 3.5vw, 17px);
    }
    
    .tab-button.active {
        border-bottom: none;
        border-left: 3px solid #ff6b9d;
        background: #fff;
    }
    
    /* 移动端未完成事项项样式优化 */
    .pending-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }
    
    .pending-content {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .pending-title {
        font-size: clamp(15px, 3.5vw, 17px);
    }
    
    .pending-desc {
        font-size: clamp(13px, 3vw, 15px);
    }
}

/* 响应式布局优化 - 针对移动端统计数据布局进行修改 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .wheel-section {
        order: -1;
    }
    
    /* 移动端历史侧边栏高度调整 */
    .history-sidebar {
        min-height: auto;
    }
    
    .history-sidebar .item-list {
        max-height: 300px;
    }
    
    /* 修改：移动端统计数据保持两列布局 */
    .stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .wheel-section {
        padding: 20px 10px;
    }
    
    .wheel-container {
        max-width: 400px;
    }
    
    .pointer {
        border-left-width: 15px;
        border-right-width: 15px;
        border-top-width: 30px;
    }
    
    .manage-section {
        padding: 15px;
    }
    
    .modal-content {
        padding: 25px 15px;
    }
    
    /* 修改：移动端统计数据保持两列布局 */
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .template-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* 修改：移动端头像昵称显示在同一行 */
    .current-player-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 15px;
    }
    
    .current-player-mobile .current-player {
        margin: 0;
    }
    
    .current-player-mobile .player-display {
        flex-direction: row;
        gap: 8px;
    }
    
    .current-player-mobile .player-avatar {
        width: 35px;
        height: 35px;
    }
    
    /* 合作模式结果展示响应式 */
    .coop-result {
        flex-direction: column;
    }
    
    .player-result {
        margin: 10px 0;
    }
    
    /* 合作模式选择界面响应式 */
    .selection-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .checkbox-row {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* 未完成事项响应式 */
    .offset-cards-display {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 移动端未完成事项按钮样式优化 */
    .pending-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        margin-top: 10px;
    }
    
    .pending-actions button {
        flex: 1;
        margin: 0 4px;
    }
    
    /* 玩家显示区域响应式 */
    .player-display {
        flex-direction: row;
        gap: 8px;
    }
    
    .player-avatar {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
        margin-bottom: 15px;
    }
    
    .wheel-container {
        max-width: 320px;
    }
    
    /* 修改：小屏幕统计数据保持两列布局 */
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: clamp(20px, 6vw, 28px);
    }
    
    .stat-label {
        font-size: clamp(11px, 3vw, 13px);
    }
    
    /* 合作模式结果展示小屏幕优化 */
    .coop-results {
        padding: 10px;
    }
    
    .player-result {
        padding: 10px;
        min-width: 120px;
    }
    
    /* 合作模式选择界面小屏幕优化 */
    .player-selection {
        gap: 15px;
    }
    
    .selection-item {
        padding: 10px;
    }
    
    /* 未完成事项小屏幕优化 */
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .tab-button.active {
        border-bottom: none;
        border-left: 3px solid #ff6b9d;
    }
    
    /* 修改：小屏幕进一步优化布局细节 */
    .btn {
        padding: 12px;
        font-size: clamp(13px, 3vw, 15px);
    }
    
    .sidebar {
        padding: 20px 15px;
    }
    
    .wheel-section {
        padding: 15px 8px;
    }
    
    .center-button {
        min-width: 70px;
        min-height: 70px;
    }
    
    .center-button-main {
        font-size: clamp(18px, 4vw, 24px);
    }
    
    .center-button small {
        font-size: clamp(11px, 2.5vw, 14px);
    }
    
    /* 移动端未完成事项按钮进一步优化 */
    .pending-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .pending-actions button {
        margin: 0;
        padding: 10px;
    }
}

/* 处理浏览器缩放 */
@media (min-width: 1400px) {
    .center-button {
        width: 24%;
        height: 24%;
    }
    
    /* PC端历史侧边栏高度与转盘模块保持一致 */
    .history-sidebar .item-list {
        max-height: 500px;
    }
}

/* PC端历史侧边栏高度优化 */
@media (min-width: 1200px) {
    .history-sidebar {
        height: 100%;
    }
    
    .history-sidebar .item-list {
        max-height: 500px;
    }
}

/* ========== 新增：文件上传输入框样式 ========== */

.file-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ffd6e7;
    border-radius: 8px;
    font-size: clamp(14px, 3vw, 16px);
    background: linear-gradient(135deg, #fff5f7, #ffe4ec);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-input:hover {
    border-color: #ff6b9d;
    background: linear-gradient(135deg, #ffe4ec, #ffd6e7);
}

.file-input:focus {
    outline: none;
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
}

.file-input::before {
    content: '📁 选择文件';
    display: inline-block;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    margin-right: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.file-input:hover::before {
    background: linear-gradient(135deg, #ff4d87, #ff6b9d);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.3);
}

/* 隐藏默认的文件输入框文字 */
.file-input::-webkit-file-upload-button {
    visibility: hidden;
}

.file-input::file-selector-button {
    visibility: hidden;
}

/* ========== 新增：转盘标题在移动端隐藏 ========== */

@media (max-width: 768px) {
    .wheel-title {
        display: none;
    }
}

/* ========== 新增：音乐设置模态框样式 ========== */

/* 音乐设置模态框样式 */
#bgMusicModal .modal-content,
#spinMusicModal .modal-content {
    max-width: 500px;
}

/* 音量滑块样式 */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ffd6e7, #ff6b9d);
    outline: none;
    margin: 15px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b9d;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #ff4d87;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b9d;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #ff4d87;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.4);
}

/* 音量显示文字样式 */
#bgMusicVolumeValue,
#spinMusicVolumeValue {
    font-weight: bold;
    color: #ff6b9d;
    font-size: clamp(14px, 3vw, 16px);
}

/* 音乐设置区域样式 */
.music-setting-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #ff6b9d;
}

.music-setting-section h3 {
    color: #ff6b9d;
    margin-bottom: 10px;
    font-size: clamp(16px, 4vw, 18px);
}

.music-setting-section p {
    font-size: clamp(12px, 2vw, 14px);
    color: #666;
    margin-bottom: 10px;
}

/* 音乐设置按钮样式 */
.music-setting-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.music-setting-buttons button {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    font-size: clamp(12px, 2vw, 14px);
}

/* 音乐开关样式 */
.music-switch {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.music-switch label {
    display: flex;
    align-items: center;
    font-size: clamp(14px, 3vw, 16px);
    color: #333;
    cursor: pointer;
}

.music-switch input[type="checkbox"] {
    display: none;
}

.music-switch .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

.music-switch .switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.music-switch .switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.music-switch input:checked + .switch-slider {
    background-color: #ff6b9d;
}

.music-switch input:checked + .switch-slider:before {
    transform: translateX(26px);
}

/* 音乐设置模态框响应式优化 */
@media (max-width: 768px) {
    .music-setting-buttons {
        flex-direction: column;
    }
    
    .music-setting-buttons button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .music-setting-section {
        padding: 10px;
    }
}

/* 音乐设置模态框标题样式 */
#bgMusicModal h2,
#spinMusicModal h2 {
    color: #ff6b9d;
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(20px, 5vw, 24px);
    border-bottom: 2px solid #ffd6e7;
    padding-bottom: 10px;
}

/* 新增：音频控制按钮样式 */
.audio-control-btn {
    background: linear-gradient(135deg, #ffd6e7, #ffe4ec);
    color: #ff6b9d;
    border: 2px solid #ffd6e7;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: clamp(12px, 2vw, 14px);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.audio-control-btn:hover {
    background: linear-gradient(135deg, #ffbcd4, #ffd6e7);
    border-color: #ff6b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.3);
}

.audio-control-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    border-color: #ff6b9d;
}

/* 音频状态指示器 */
.audio-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: clamp(12px, 2vw, 14px);
    margin: 5px 0;
}

.audio-status.playing {
    background: rgba(76, 217, 100, 0.1);
    color: #4cd964;
    border: 1px solid #4cd964;
}

.audio-status.paused {
    background: rgba(255, 107, 157, 0.1);
    color: #ff6b9d;
    border: 1px solid #ff6b9d;
}

.audio-status.error {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

/* 音频播放器容器 */
.audio-player-container {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #ff6b9d;
}

.audio-player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.audio-info {
    font-size: clamp(12px, 2vw, 14px);
    color: #666;
    margin-bottom: 8px;
}

.audio-info strong {
    color: #ff6b9d;
}